package com.ruibang.glass.produce.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruibang.glass.produce.domain.req.FlowRateTrendReq;
import com.ruibang.glass.produce.domain.req.ThicknessTrendReq;
import com.ruibang.glass.produce.domain.req.TrafficTrendReq;
import com.ruibang.glass.produce.domain.resp.*;
import com.teaming.cloud.framework2.autoconfigure.dynamic.datasource.annotation.DS;
import com.teaming.cloud.framework2.autoconfigure.mybatisplus.mapper.CommonMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Author: songJinKang
 * @CreateTime: 2023-11-23  15:56
 * @Description: TODO
 * @Version: 1.0
 */
@Mapper
public interface HotRealTimeMapper extends CommonMapper<Object> {

    @DS("hot2_bc2mes")
    IPage<Map<String, String>> thicknessTrend(Page<Map<String, String>> tPage, @Param("thicknessTrendReq") ThicknessTrendReq thicknessTrendReq);

    @DS("hot2_bc2mes")
    List<FlowRateTrendData> flowRateTrend(@Param("startTime") String startTime, @Param("endTime") String endTime);

    @DS("hot2_bc2mes")
    CutterHeadSlicingData getDcData();

    @DS("click_cz")
    List<WeighingTrendBase> weighingTrend(@Param("flowRateTrendReq") FlowRateTrendReq flowRateTrendReq);

    @DS("click_cz")
    List<Flows> queryTrafficTrend(@Param("trafficTrendReq") TrafficTrendReq trafficTrendReq);

    @DS("click_dcs")
    List<HotRealTimeLiquidLevel> queryLiquidLevel(@Param("trafficTrendReq") TrafficTrendReq trafficTrendReq);

    @DS("click_dcs")
    List<HotRealTimeFeedingFrequency> queryFeedingFrequency(@Param("trafficTrendReq") TrafficTrendReq trafficTrendReq);

    @DS("hot2_bc2mes")
    List<CutterHeadSlicingData> exportForceCutLength(@Param("startTime") long startTime, @Param("endTime") long endTime);

    @DS("hot2_bc2mes")
    IPage<CutterHeadSlicingData> queryForceCutLengthData(Page<CutterHeadSlicingData> page, @Param("startTime") long start, @Param("endTime") long end);

    @DS("hot2_bc2mes")
    List<HqTimeInfo> getHqTime(List<String> hotIds);
}
